<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<style type="text/css">
	*{
		font-family:微软雅黑;
	}
</style>
<body>
	<p>name</p>
	<p><input type="text"></p>
	<p>code</p>
	<p><input type="text"></p>
	<p>yanzheng</p>
	<p><input type="text" id='imgid'></p>
	<p><input type="submit" value='sure'></p>
</body>
<script type="text/javascript">
	imgobj=document.getElementById('imgid');
	imgobj.onkeyup=function(){
		arr=imgobj.value;
		val2=arr.toUpperCase(arr);
		imgobj.value=val2;

	}
</script>
</html>